export const declension = (
  number: number | null | undefined,
  txt: string[],
  cases: number[] = [2, 0, 1, 1, 1, 2],
): string => {
  if (!number) return txt[0];
  return txt[number % 100 > 4 && number % 100 < 20 ? 2 : cases[number % 10 < 5 ? number % 10 : 5]];
};
